package edu.zut.cs.javaee.manager.register.service;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import edu.zut.cs.javaee.manager.base.service.GenericGenerator;
import edu.zut.cs.javaee.manager.register.domain.Register;

public class RegisterEntityGenerator extends GenericGenerator {
	RegisterManager registerManager;
	@Autowired
	public void setRegisterManager(RegisterManager registerManager) {
		this.registerManager =registerManager;
		
	}
	String Register[]= {"软件工程","计科","信息","网络"};
	@Test 
	public void gen_reg() {
		for(int i=1;i<=4;i++) {
			Register register=new Register();
			register.setRegister_name("register_"+i+"_"+Register[i-1]);
			this.registerManager.save(register);			
		}
	}
}
